import instance from '../../axios/index'


// 获取商品分类
export const getGoodsClassify = async () => {
        const res=await instance.get('Suit/goodsCategory')
        return res.data.data
}

//添加套装
export const addSuit = async (data:any) => {
        const res=await instance.post('Suit/addCategory',data)
        return res.data.data
}

//回显功能
export const getSuit = async (id:any) => {
   const res=await instance.post('Suit/editCategory',{id})   
   return res.data.data
}

//修改功能
export const editSuit = async (data:any) => {
    const res=await instance.post('Suit/editCategoryTo',data)
    return res.data.data
}

//状态功能
export const changeSuitStatus = async (id:number,status:any) => {
    const res=await instance.post(`/Suit/qiyongCategory/${id}`,status)
    return res.data.data
}

//删除功能
export const deleteSuit = async (id:number) => {
    const res=await instance.post("/Suit/deleteCategory/",{id})
    return res.data.data
}